#ifndef LCD_CMF1P2301_HPP
#define LCD_CMF1P2301_HPP
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "lcd.hpp"
#include "gpio.hpp"
///具体的LCD 类型
namespace device
{
	class lcd_cmf1p2301:public lcd
	{
		public:
			
			typedef struct
			{
				gpio::GpioPinTPDF Cd;
				gpio::GpioPinTPDF Cs;
				gpio::GpioPinTPDF Rst;
				gpio::GpioPinTPDF Wr0;
				gpio::GpioPinTPDF Wr1;
				gpio::GpioPinTPDF DataLsbPin;
			}LcdCmf1p2301InitTPDF;
		private:
			
			uint8_t mBuff[128][4];
            static uint32_t uiTick;
			LcdCmf1p2301InitTPDF mLcdCmf1p2301Init;
			void vLcdCommand(uint8_t cmd);
			void vLcdData(uint8_t data);
			static bool LcdTimerTick(void);
		public:
			
			lcd_cmf1p2301(LcdCmf1p2301InitTPDF *tLcdCmf1p2301Init);
			virtual const LcdAttributeTPDF* GetLcdAttribute(void);
			virtual void   vSetTick(uint32_t tick);
			virtual uint32_t uiGetTick(void);		
			virtual void Reset(void);
			virtual void Clear(void);
			virtual void DrawHorizontal(uint32_t uiStartX, uint32_t uiStartY, const uint8_t *ucDots, uint32_t Len);
			virtual void DrawHorizontal(uint32_t uiStartX, uint32_t uiStartY, const uint8_t *ucDots, RGBTPDF *tDots, uint32_t Len);
			virtual void DrawVertical(uint32_t uiStartX, uint32_t uiStartY, const uint8_t *ucDots, uint32_t Len);
			virtual void DrawVertical(uint32_t uiStartX, uint32_t uiStartY, const uint8_t *ucDots, RGBTPDF *tDots, uint32_t Len);
	};
}

#endif
